package com.canaan.business.mapper.inOutStock;

import com.canaan.business.domain.inOutStock.WmsInStockOrder;
import com.canaan.business.domain.vo.WmsInStockOrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 入库单Mapper接口
 *
 * @author ruoyi
 * @date 2022-12-20
 */
public interface WmsInStockOrderMapper
{
    /**
     * 查询入库单
     *
     * @param id 入库单主键
     * @return 入库单
     */
    public WmsInStockOrder selectWmsInStockOrderById(Long id);
    /**
     * 查询入库单
     *
     * @param no 入库单编号
     * @return 入库单
     */
    public WmsInStockOrder selectWmsInStockOrderByNo(String no);

    /**
     * 查询入库单列表
     *
     * @param wmsInStockOrder 入库单
     * @return 入库单集合
     */
    public List<WmsInStockOrder> selectWmsInStockOrderList(WmsInStockOrder wmsInStockOrder);

    /**
     * 新增入库单
     *
     * @param wmsInStockOrder 入库单
     * @return 结果
     */
    public int insertWmsInStockOrder(WmsInStockOrder wmsInStockOrder);

    /**
     * 修改入库单
     *
     * @param wmsInStockOrder 入库单
     * @return 结果
     */
    public int updateWmsInStockOrder(WmsInStockOrder wmsInStockOrder);

    /**
     * 删除入库单
     *
     * @param id 入库单主键
     * @return 结果
     */
    public int deleteWmsInStockOrderById(Long id);

    /**
     * 批量删除入库单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWmsInStockOrderByIds(Long[] ids);

    /**
     * 导出列表查询
     * @param entity    参数
     * @return 导出列表
     */
    public List<WmsInStockOrderVo> exportList(WmsInStockOrder entity);

    WmsInStockOrder selectWmsInStockOrderByRelOrderNo(@Param("relOrderNo") String relOrderNo, @Param("orderType")Integer orderType);


    /**
     * 获取今日完成数
     * @param storehouseNo
     * @return
     */
    Integer getTodayCompletedNum(@Param("storehouseNo") String storehouseNo);

    /**
     * 获取待入库数
     * @param storehouseNo
     * @return
     */
    Integer getWaitInStockNum(@Param("storehouseNo") String storehouseNo);
}
